package org.lys.web.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.IterationTag;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;
/**
 * @Description:使用标签控制界面内容重复输出
 * @Copyright: 福州骏华信息有限公司 (c)2013
 * @Created Date : 2013-4-6
 * @Author lys
 */
public class TagDemo3 extends TagSupport {
	int x = 5;
	@Override
	public int doAfterBody() throws JspException {
		if(x>0){
			x--;
			return IterationTag.EVAL_BODY_AGAIN;
		}
		return IterationTag.SKIP_BODY;
	}
	@Override
	public int doStartTag() throws JspException {
		return Tag.EVAL_BODY_INCLUDE;
	}
}
